package cn.jinjie.day10;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Test01 {
    public static void main(String[] args) {
        try {
            method();
        } catch (ParseException e) {//捕获异常
            // throw new RuntimeException(e);
            System.out.println(e);
            System.out.println("日期有问题");
        } catch (FileNotFoundException e) {
            System.out.println(e);
            System.out.println("文件路径有错");
        }
        System.out.println(123);
    }

    public static void method() throws ParseException, FileNotFoundException {//他也不处理抛出
        show();
    }

    public static void show() throws ParseException, FileNotFoundException {//不处理抛出
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
        sdf.parse("2026");
        System.out.println(100);
        //读取文件 abc.mp4
        FileInputStream fis = new FileInputStream("day09笔记.md");
    }
}
